node = current_node
jetty = node.jetty
upstream "jetty_at_#{node.name}" do
  server node.ip, node.jetty.port
end
# TODO, local webapp(every node has one) needn't be proxied
jetty.webapps.each_pair do |name, webapp|
  context = webapp['url']
  location context, "jetty_at_#{node.name}"
end
